/* Copyright (C) 2014, Pois0n Dev Team */
/* This file is part of MOK( Multitasking Operations Kernel ) */
/*
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

/** This file defines the basic types that will be used for compilation */

#ifndef KTYPES_H
#define KTYPES_H

typedef unsigned char UINT8;
typedef   signed char  INT8;

#if defined(__SILP64__) || defined(_SILP64)
 #error "Your system doesn't support 16-bit integers."
#else
typedef unsigned short UINT16;
typedef   signed short  INT16;
#endif

typedef UINT16 WCHAR;

#if defined(__ILP64__) || defined(_ILP64)
 #error "Your system doesn't support 32-bit integers."
#elif defined(__LP32__) || defined(_LP32)
typedef unsigned long UINT32;
typedef   signed long  INT32;
#else
typedef unsigned int UINT32;
typedef   signed int  INT32;
#endif

#if defined(_WIN64) || defined(__LLP64__) || defined(_LLP64)
typedef unsigned long long UINT64;
typedef   signed long long  INT64;
#elif defined(__LP64__) || defined(_LP64)
typedef unsigned long UINT64;
typedef   signed long  INT64;
#elif defined(_MOK64)
 #error "Your system doesn't support 64-bit integers."
#endif

typedef UINT32 PTR32;
#ifdef _MOK64
typedef UINT64 PTR64;
#endif

#if defined(_WIN64) || defined(__LLP64__) || defined(_LLP64) || defined(__LP64__) || defined(_LP64)
typedef PTR64 INTPTR;
#else
typedef PTR32 INTPTR;
#endif

typedef enum { FALSE = 0, TRUE = 1 }BOOL;

#endif /* KTYPES_H */
